				X2GOF

Michael Lloyd (http://www.hsu.edu/faculty/lloydm/ti/prgmtabl.html)
Henderson State University


PROGRAM DESCRIPTION
This program is similar to the Chi-squared goodness-of-fit 
feature on the advanced statistical flash application for the 
TI-89. The TI-89 prompts for the the degrees of freedom, 
but this program computes it by subtracting 1 from the list 
size.

HISTORY
1.0 - May 2001 - original version
1.1 - Apr 2003 - fixed degrees of freedom error, fixed format of p value display,
                 added version number and copyright
1.2 - August 2015 - updated file to .8xp

PROGRAM LISTING
ClrHome
Disp "VERSION 1.1","(C)2003 M LLOYD"
Input "OBS LIST=",\L\\theta\O
Input "EXP LIST=",\L\\theta\E
dim(\L\\theta\O)-1\->\K
Disp "X2="
(\L\\theta\O-\L\\theta\E)\^2\/\L\\theta\E\->\\L\COMP
sum(\L\COMP)\->\T
Output(5,4,T)
Disp "P="
Output(6,3,1-\chi\\^2\cdf(0,T,K))
Disp "DF="
Output(7,4,K)
Disp "COMP LIST:"
Pause \L\COMP
DelVar \L\\theta\O:DelVar \L\\theta\E